Skip to content

feat: decode escapes when matching names, add css_unescape - #360

Closed
bartveneman wants to merge 1 commit into
mainfrom
claude/compassionate-davinci-wjk4ce
Closed

bartveneman wants to merge 1 commit into
mainfrom
claude/compassionate-davinci-wjk4ce

Conversation

@bartveneman

Copy link
Copy Markdown
Member

Names are now compared with escapes decoded, so @\6d edia, :\6e ot(.a), \75 rl(a.png) and @\73 cope (...) dispatch like @media, :not(), url() and @scope. str_equals and the internal range comparison decode without allocating, and node .text, .name and .property stay raw.

Adds a public css_unescape(text) helper (CSS Syntax "consume an escaped code point": NULL, surrogates and out-of-range become U+FFFD; a backslash before a newline or at the end is kept).


Generated by Claude Code

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Package Size Increase

📦 Package 📏 Base Size 📏 Source Size 📈 Size Change
@projectwallace/css-parser 48.8 kB 50 kB +1.2 kB

@pkg-pr-new

pkg-pr-new Bot commented Nov 14, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@projectwallace/css-parser@1de02e8

commit: 1de02e8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants